﻿<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <title>首页</title>
  <meta name="page-view-size" content="1280*720" />
  <link rel="stylesheet" href="./css/base.css" />
  <link rel="stylesheet" href="./css/townMoney.css" />
  <script type="text/javascript" src="./lib/js/evm.js"></script>
  <script type="text/javascript" src="./lib/js/Evm_djyw.js"></script>
  <script type="text/javascript" src="./lib/js/key.js"></script>
  <script src="lib/js/md5.js" type="text/javascript" charset="utf-8"></script>
  <script src="./lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="./lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
  <script src="./js/api.js" type="text/javascript" charset="utf-8"></script>
  <script src="./js/public.js" type="text/javascript" charset="utf-8"></script>
</head>

<body onUnload="exitPage();">
  <div class="index-bg" id="indexMain">
    <div class="model">
      <img class="xz" src="images/base/xz1.png" alt="">

      <img class="x" src="images/base/1.png" alt="">
    </div>
    <div class="model">
      <img class="xz" src="images/base/xz2.png" alt="">
      <img class="x" src="images/base/2.png" alt="">

    </div>
    <div class="model">
      <img class="xz" src="images/base/xz3.png" alt="">
      <img class="x" src="images/base/3.png" alt="">

    </div>
    <div class="model">
      <img class="xz" src="images/base/xz4.png" alt="">
      <img class="x" src="images/base/4.png" alt="">

    </div>

    <div class="adimg">
      <img src="images/indexad.png" alt="">
    </div>
    <div class="adtextbox">
      <div class="adcontent">
        新桥镇新时代文明实践所总投资约500万元，建筑面积3500平方米，下设22个村（社区）文明实践站。实践所建有新时代讲堂、文化展示厅、电子阅览室、农家书屋、妇女儿童活动室、书画创作室、体育健身室等，是综合协调文明实践资源、指导文明实践活动的枢纽，是聚群众、聚力量、聚思想的综合性宣传教育阵地。
      </div>
    </div>
  </div>

</body>
<script src="js/video.js"></script>
<script>
  // 首页视频
  if (0) {
    var params = {};
    var mediaStr;
    mediaStr = "http://172.19.208.2/index.mp4";
    setTimeout(function () {
      try {
        var videoSize = [58, 132, 575, 322];
        mp = runVideo(mediaStr, videoSize);
      } catch (e) {}
    }, 500);

    var video_number;
    var video_time;
    var loop = setInterval(function () {
      try {
        video_number = mp.getCurrentPlayTime();
        video_time = mp.getMediaDuration();
        if (video_number > video_time - 3) {
          mp.playByTime(0, 0, 1);
        }
      } catch (error) {}

    }, 2000);
  }

  var modelIndex = {
    isVideo: true,
    disUser: true,
    isIndex: true,
    disHeader: true,
    index: 0, //初始位置
    listName: "model", //模块名称
    containerId: "indexMain", //包含模块的标签id
  };
  log(modelIndex, 2333)
  var data = [{
      name: "视频窗口",
      url: "play.html",
    },
    {
      name: "百姓点单",
      cid: "55",
      url: "A-doubleList.html",
      model: 'order'
    },
    {
      name: "志愿花开",
      url: "D_Volunteer_flower.html",
      model: 'volunteer'
    },

    {
      name: "文明东台",
      url: " A-doubleList.html",
      model: "civilization"
    },
  ];

  function direOpt(index, directive) {

    switch (directive) {
      case "up":
        console.log("toptop");

        break;
      case "down":
        console.log("toptop");

        break;
      case "backwards":
        console.log("left");
        if (index == 0) {
          return index;
        } else {
          index--

        }
        break;
      case "forwards":
        console.log("right");
        if (index == $(".model").length-1) {
          return index;
        } else {
          index++

        }

        break;
    }

    console.log(index);
    return index;
  }

  function direEnter(index) {
    console.log('enter,index :>> ',index);

  }

  function exitPage() {
    try {
      mp.stop();
      // statements
    } catch (e) {
      // statements
      console.log(e);
    }
  }

</script>

<script type="text/javascript" src="js/index.js"></script>

</html>